home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / util / rexx / rkr_rexx.readme < prev    next >
Encoding:
Text File  |  1995-04-27  |  2.4 KB  |  63 lines

  1. Short:    A handful of very useful scripts (1.0)
  2. Author:   rkr@olib.org
  3. Uploader: Aminet.Upload.Problems@olib.org
  4. Type:     util/rexx
  5.  
  6. These six ARexx scripts have proven to be of great use, to me.    They are
  7. primarily to be used as functions from other ARexx scripts:
  8.     COMMAND( CMD )
  9.     Executes a command, CMD, and return the output.  The command output
  10.     is run through a PIPE: stream.    (NOTE: If the program generates no
  11.     output, COMMAND() can get stuck.)
  12.         say compress( command( 'list rexx:command.rexx' ), 'ex' )
  13.         ==>
  14.         Dirctory "r:" on Tusday 11-Apr-95
  15.         command.r              431 ----rwd 29-Jan-95 03:51:58
  16.         1 fil - 2 blocks usd
  17.  
  18.     GETENV( VAR )
  19.     Retrieves a given ENV: VAR for you.
  20.         say getenv( 'user' )                ==> rkr
  21.  
  22.     GETFILE( FILE )
  23.     Reads the contents of a FILE.
  24.         say getfile( 'env:user' )           ==> rkr
  25.  
  26.     PUTFILE( CONTENTS, FILE )
  27.     Stores CONTENTS into a FILE.
  28.         say putfile( 'test', 'ram:test' )   ==> test
  29.  
  30.     REPLACE( SRC, OLD, NEW )
  31.     Scans SRC and changes all OLD with NEW.  The result string is
  32.     returned.
  33.         say replace( 'abc', 'b', 'bb' )     ==> abbc
  34.  
  35.     SETENV( CONTENTS, VAR, ENVARC )
  36.     Stores CONTENTS into the ENV: var, VAR.  If you pass a 1 in for
  37.     ENVARC, it also writes the data to the ENVARC: copy of the VAR.
  38.         say setenv( 'rkr', 'user', 1 )      ==> rkr
  39.  
  40. These 6 recur enough that it seems silly to rewrite them in every script I
  41. write, but not so often/centrally that it's worth taking the time to create
  42. a proper .library for them.
  43.  
  44. I'm posting them seperately as I hope to shortly release a set of archives,
  45. somewhat independant, but all of them hinging, to one degree or another, on
  46. these six scripts for occasional support.  Who knows, you might even find
  47. your OWN uses for them.  (^&
  48.  
  49.  
  50. ============================= Archive contents =============================
  51.  
  52. Original  Packed Ratio    Date     Time    Name
  53. -------- ------- ----- --------- --------  -------------
  54.      527     321 39.0% 12-Feb-95 22:41:08  command.rexx
  55.      357     265 25.7% 12-Feb-95 22:41:10  getenv.rexx
  56.      319     202 36.6% 12-Feb-95 22:41:10  getfile.rexx
  57.      258     181 29.8% 12-Feb-95 22:41:12  putfile.rexx
  58.      529     342 35.3% 15-Jan-95 18:06:58  replace.rexx
  59.      564     368 34.7% 12-Feb-95 22:41:14  setenv.rexx
  60.     1762    1027 41.7% 11-Apr-95 14:54:20  rkr_rexx.readme
  61. -------- ------- ----- --------- --------
  62.     4316    2706 37.3% 16-Apr-95 17:11:20   7 files
  63.